﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Infrastructure.ExternalService.Core.IdentityCheck.Request
{
    #region 三要素校验入参，及是否进行二要素、三要素校验选择
    public class IdentityCheckRequest
    {
        /// <summary>
        /// 学员标识（必传）
        /// </summary>
        public string UserId { get; set; }

        /// <summary>
        /// 是否学员本人登录
        /// </summary>
        public bool IsStuLogin { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        public string IdCardNo { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        public string Mobile { get; set; }

        public string CustMobile_Secret { get; set; }   

        /// <summary>
        /// 前端是否修改个人身份信息(1:身份证号发生修改后验证，0：原身份证号未修改直接验证)
        /// </summary>
        public string Action { get; set; }

        /// <summary>
        /// 调用终端（IOS:苹果、ANDROID:安卓、WEB:网站、UADMIN:运营平台）
        /// </summary>
        public string Terminal { get; set; }

        /// <summary>
        /// 调用场景（ORDER_CREATE:创建订单、ORDER_EDIT:编辑订单、MIDPAGE_PAY:支付中间页、STUDENT_PAY:学员端支付、ORDER_COMFRIM:订单确认）
        /// </summary>
        public string Scene { get; set; }

        /// <summary>
        /// 客户在升学不存在时，是否基于客户营销，在升学创建客户
        /// </summary>
        public bool IsAdd { get; set; } = false;

        /// <summary>
        /// 是否需要三要素校验
        /// </summary>
        public bool IsThreeVerify { get; set; } = false;

        /// <summary>
        /// 是否需要二要素校验
        /// </summary>
        public bool IsTwoVerify { get; set; } = true;
    }
    #endregion

    #region 调用外部数据进行二要素、三要素校验的请求参数
    public class ExtenalDataIdentityRequest
    {
        [JsonProperty("cardNo")]
        public string CardNo { get; set; }

        [JsonProperty("realName")]
        public string RealName { get; set; }

        [JsonProperty("mobile")]
        public string Mobile { get; set; }
    }
    #endregion

    #region 调用用户中心进行二要素校验的请求参数
    public class UserCenterTwoElementRequest
    {
        /// <summary>
        /// UserId
        /// </summary>
        [JsonProperty("userId")]
        public string UserId { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        [JsonProperty("userIdcard")]
        public string UserIdCard { get; set; }

        /// <summary>
        /// 用户证件类型 I:身份证;H:港澳通行证;T:台湾来往大陆通行证;O:军官证;P:护照
        /// </summary>
        [JsonProperty("userIdcardtype")]
        public string UserIdCardType { get; set; }

        /// <summary>
        /// 用户端IP
        /// </summary>
        [JsonProperty("userIdentifyIp")]
        public string UserIdentifyIp { get; set; }

        /// <summary>
        /// 用户姓名
        /// </summary>
        [JsonProperty("userName")]
        public string UserName { get; set; }
    }
    #endregion

    #region 调用用户中心进行三要素校验的请求参数
    public class UserCenterThreeElementRequest
    {
        [JsonProperty("ip")]
        public string Ip { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        [JsonProperty("userIdcard")]
        public string UserIdCard { get; set; }

        /// <summary>
        /// 用户证件类型 I:身份证;H:港澳通行证;T:台湾来往大陆通行证;O:军官证;P:护照
        /// </summary>
        [JsonProperty("userIdcardtype")]
        public string UserIdCardType { get; set; }

        /// <summary>
        /// 用户姓名
        /// </summary>
        [JsonProperty("userName")]
        public string UserName { get; set; }

        /// <summary>
        /// 用户信息
        /// </summary>
        [JsonProperty("ucUser")]
        public UcUser UcUser { get; set; }
    }

    public class UcUser
    {
        /// <summary>
        /// UserId
        /// </summary>
        [JsonProperty("userId")]
        public string UserId { get; set; }

        /// <summary>
        /// 用户手机号
        /// </summary>
        [JsonProperty("userMobile")]
        public string UserMobile { get; set; }

        /// <summary>
        /// 用户姓名
        /// </summary>
        [JsonProperty("userName")]
        public string UserName { get; set; }
    }
    #endregion
}
